import Vue from "vue";
import Router from "vue-router";

import try3 from "../components/try3";
import Home from "../components/Home";

import PaperRead from "../components/analyze/paper/PaperRead";
import PaperGood from "../components/analyze/paper/PaperGood";
import PaperTime from "../components/analyze/paper/PaperTime";
import PaperCount from "../components/analyze/paper/PaperCount";
import PaperCommit from "../components/analyze/paper/PaperCount";
import PaperCategory from "../components/analyze/paper/PaperCategory";
import PaperDay from "../components/analyze/paper/PaperTime";
import PaperWeek from "../components/analyze/paper/PaperWeek";
import PaperMonth from "../components/analyze/paper/PaperMonth";
import CategoryGood from "../components/analyze/paper/CategoryGood";
import CategoryRead from "../components/analyze/paper/CategoryRead";
import CategoryCommit from "../components/analyze/paper/CategoryCommit";
import PersonPopular from "../components/analyze/person/PersonPopular";
import PersonGood from "../components/analyze/person/PersonGood";
import PersonRead from "../components/analyze/person/PersonRead";
import PersonWrite from "../components/analyze/person/PersonWrite";
import PersonCommit from "../components/analyze/person/PersonRead";
import PersonCategory from "../components/analyze/person/PersonCategory";
import PersonDay from "../components/analyze/person/PersonDay";
import PersonWeek from "../components/analyze/person/PersonWeek";
import PersonMonth from "../components/analyze/person/PersonMonth";
import PaperSum from "../components/analyze/all/avgReadCount";
import PersonSum from "../components/analyze/all/avgCommit";
import CommitSum from "../components/analyze/all/avgReadTime";
import PaperKeyWord from "../components/analyze/paper/PaperKeyWord";
Vue.use(Router);

export default new Router({
  mode: "history",
  routes: [
    {
      path: '/index',
      name: 'Home',
      component: Home,
      // home页面并不需要被访问
      redirect: '/1-1',
      children: [
        {
          path: '/1-1',
          name: 'paperRead',
          component: PaperRead,
        },
        {
          path: '/1-2',
          name: 'paperTime',
          component: PaperTime,
        },
        {
          path: '/1-3',
          name: 'paperCount',
          component: PaperCount,
        },
        {
          path: '/1-4',
          name: 'paperCategory',
          component: PaperCategory,
        },{
          path: '/1-5',
          name: 'paperKeyword',
          component: PaperKeyWord,
        },
        // {
        //   path: '/1-5-1',
        //   name: 'paperDay',
        //   component: PaperDay,
        // },
        // {
        //   path: '/1-5-2',
        //   name: 'paperWeek',
        //   component: PaperWeek,
        // },
        // {
        //   path: '/1-5-3',
        //   name: 'paperMonth',
        //   component: PaperMonth,
        // },
        // {
        //   path: '/1-6',
        //   name: 'categoryRead',
        //   component: CategoryRead,
        // },
        // {
        //   path: '/1-7',
        //   name: 'categoryGood',
        //   component: CategoryGood,
        // },
        // {
        //   path: '/1-8',
        //   name: 'categoryCommit',
        //   component: CategoryCommit,
        // },
        {
          path: '/2-1',
          name: 'personPopular',
          component: PersonPopular,
        },
        {
          path: '/2-2',
          name: 'personGood',
          component: PersonGood,
        },
        {
          path: '/2-3',
          name: 'personRead',
          component: PersonRead,
        },
        {
          path: '/2-4',
          name: 'personWrite',
          component: PersonWrite,
        },
        // {
        //   path: '/2-4',
        //   name: 'personCategory',
        //   component: PersonCategory,
        // },
        // {
        //   path: '/2-5-1',
        //   name: 'paperDay',
        //   component: PersonDay,
        // },
        // {
        //   path: '/2-5-2',
        //   name: 'paperWeek',
        //   component: PersonWeek,
        // },
        // {
        //   path: '/2-5-3',
        //   name: 'paperMonth',
        //   component: PersonMonth,
        // },
        {
          path: '/3-1',
          name: 'paperSum',
          component: PaperSum,
        },
        {
          path: '/3-2',
          name: 'personSum',
          component: PersonSum,
        },
        {
          path: '/3-3',
          name: 'commitSum',
          component: CommitSum,
        }
      ]
    },
    {
      path: '/',
      name: "yyy",
      component: try3,

    },
  ]
});

// const routes = [
//   {
//     path: "/",
//     name: "Main",
//     component: MainScene
//   },
//   {
//     path: "/about",
//     name: "About",
//     // route level code-splitting
//     // this generates a separate chunk (about.[hash].js) for this route
//     // which is lazy-loaded when the route is visited.
//     component: () =>
//       import(/* webpackChunkName: "about" */ "../views/About.vue")
//   }
// ];
//
// const router = new VueRouter({
//   routes
// });
//
// export default router;
